Component({
  data: {
    maxCount: 200, // 文本框最大字数限制
    currentLength: 0 // 当前文本输入字数
  },
  methods: {
    onInput(e) {
      // todo what you want
      // eg: calculate the character length of a text box
      let value = e.detail.value;
      this.setData({
        currentLength: value.length
      });
    }
  }
})